import { Transform } from "class-transformer";
import { IsNotEmpty, IsNumber, IsOptional, IsString } from "class-validator";

export class SearchWorkPostDto {
  @IsNotEmpty()
  @IsNumber()
  @Transform(({value}) => Number(value))
  currentPage: number;

  @IsNotEmpty()
  @IsNumber()
  @Transform(({value}) => Number(value))
  pageSize: number;

  @IsNotEmpty()
  @IsNumber()
  @Transform(({value}) => Number(value))
  departmentId: number;

  @IsOptional()
  @IsString()
  workPostName: string;

}